Skip to content

Conversation

@emilio
Copy link
Member

@emilio emilio commented May 14, 2023

For nesting, we need to parse declaration and nested rules together. Rather than having DeclarationListParser, organize the parsing code in two:

  • StyleSheetParser for the top level stylesheet, which has the relevant hacks and so on.
  • RuleBodyParser which does potentially everything else.

For that, introduce a new trait that agglomerates all the nesting needs (so potentially all of at-rule + qualified-rule + declaration parsing).

While at it, change the API a little bit so that these take mutable
references, so that we can avoid some copying.

@emilio
Copy link
Member Author

emilio commented May 14, 2023

r? @tiaanl

For nesting, we need to parse declaration and nested rules together.
Rather than having DeclarationListParser, organize the parsing code in
two:

 * StyleSheetParser for the top level stylesheet, which has the relevant
   hacks and so on.
 * RuleBodyParser which does potentially everything else.

For that, introduce a new trait that agglomerates all the nesting needs
(so potentially all of at-rule + qualified-rule + declaration parsing).

While at it, change the API a little bit so that these take mutable
references, so that we can avoid some copying.
Copy link
Collaborator

@tiaanl tiaanl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't looked at the implementation of this in fx, but no issues here.

@emilio
Copy link
Member Author

emilio commented May 16, 2023

@bors-servo r=tiaanl

@bors-servo
Copy link
Contributor

📌 Commit bcbc543 has been approved by tiaanl

@bors-servo
Copy link
Contributor

⌛ Testing commit bcbc543 with merge ba298b6...

@bors-servo
Copy link
Contributor

☀️ Test successful - checks-github
Approved by: tiaanl
Pushing ba298b6 to master...

@bors-servo bors-servo merged commit ba298b6 into master May 16, 2023
@emilio emilio deleted the nesting branch May 16, 2023 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants